package mk.com.ldm.corepoint.implementation.shared;

import java.io.Serializable;
import java.util.ArrayList;

@SuppressWarnings("serial")
public class TableRows implements Serializable{
	private int total = 0;
	private int primary;
	private int returnColumn;
	private String tableName;
	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	private ArrayList<TableRow> rows = new ArrayList<TableRow>();
//	private ArrayList<String> headers = new ArrayList<String>();
	private ArrayList<TableColumn> columns = new ArrayList<TableColumn>();
	
	public TableRows(){}

	public TableRows(int total, ArrayList<TableRow> rows) {
		super();
		this.total = total;
		this.rows = rows;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public ArrayList<TableRow> getRows() {
		return rows;
	}

	public void setRows(ArrayList<TableRow> rows) {
		this.rows = rows;
	}
	
	public void addRow(TableRow r){
		this.rows.add(r);
	}

	public int getPrimary() {
		return primary;
	}

	public void setPrimary(int primary) {
		this.primary = primary;
	}

	public int getReturnColumn() {
		return returnColumn;
	}

	public void setReturnColumn(int returnColumn) {
		this.returnColumn = returnColumn;
	}

//	public ArrayList<String> getHeaders() {
//		return headers;
//	}
//
//	public void setHeaders(ArrayList<String> headers) {
//		this.headers = headers;
//	}
//	
//	public void addHeader(String h){
//		this.headers.add(h);
//	}

	public ArrayList<TableColumn> getColumns() {
		return columns;
	}

	public void setColumns(ArrayList<TableColumn> columns) {
		this.columns = columns;
	}
	
	public void addColumn(TableColumn column){
		this.columns.add(column);
	}
}
